from po.add_member_page import AddMemberPage
from po.base_page import BasePage
from po.contact_page import ContactPage


class MainPage(BasePage):

    _base_url = "https://work.weixin.qq.com/wework_admin/frame#index"

    def goto_contact(self):
        """
        跳转通讯录页面
        :return:
        """
        self.driver.find_element_by_id("menu_contacts").click()
        return ContactPage(self.driver)

    def goto_add_member(self):
        """
        跳转添加成员页面
        :return:
        """
        self.driver.find_element_by_css_selector(".ww_indexImg_AddMember").click()
        return AddMemberPage(self.driver)